﻿@page "/category/{category}"
@model Meowv.Blog.Web.Pages.Posts.CategoryModel
@{
    var response = Model.Posts;

    var category = response.Message;
    var posts = response.Result;

    ViewData["Title"] = $"{category} - ";
}
<div class="post-wrap tags">
    <h2 class="post-title">-&nbsp;Category&nbsp;·&nbsp;@category&nbsp;-</h2>
</div>
<div class="post-wrap archive">
    @foreach (var item in posts)
    {
        <h3>@item.Year</h3>
        @foreach (var post in item.Posts)
        {
            <article class="archive-item">
                <a href="@("/post/" + post.Url)">@post.Title</a>
                <span class="archive-item-date">@post.CreatedAt</span>
            </article>
        }
    }
</div>